<template>
<div>
 <el-card>
     <el-form :model="form1" >
       <el-form-item >
         <el-input placeholder="用户名"  ></el-input>
         <el-button type="primary" icon="el-icon-edit">修改</el-button>
         <el-button type="primary" icon="el-icon-share">添加</el-button>
         <el-button type="primary" icon="el-icon-delete">删除</el-button>
         <el-button type="primary" icon="el-icon-search">查询</el-button>
       </el-form-item>
     </el-form>
   <el-table
     v-loading="loading"
     element-loading-text="拼命加载中"
     element-loading-spinner="el-icon-loading"
     border
     stripe
     :data="form"
     style="width: 100%">
     <el-table-column
       prop="user_id"
       label="用户ID">
     </el-table-column>
     <el-table-column
       prop="username"
       label="用户名">
     </el-table-column>
     <el-table-column
       prop="dept_id"
       label="所属部门">
     </el-table-column>
     <el-table-column
       prop="email"
       label="邮箱">
     </el-table-column>
     <el-table-column
       prop="mobile"
       label="手机号">
     </el-table-column>
     <el-table-column
       prop="status"
       label="状态">
     </el-table-column>
     <el-table-column
       prop="create_time"
       label="创建时间">
     </el-table-column>
   </el-table>
 </el-card>
</div>
</template>

<script>
export default {
  created () {
    this.loading = true
    this.$http.get('/manager').then((result) => {
      this.form = result.data.data
      console.log(this.form)
      this.loading = false
    })
  },
  data () {
    return {
      form1: {},
      form: [],
      loading: false
    }
  }
}
</script>
<style scoped>
.el-form{
  position:relative;
  margin-bottom:50px;
  width:100%;
}
.el-input {
  position: absolute;
  width:35%;
  left:0px;
}
.el-button {

}
</style>
